package com.dimples.dd.system.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dimples.dd.tenant.core.dataobject.TenantBaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 部门表
 */
@Schema(description="部门表")
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "system_dept")
public class SystemDeptDO extends TenantBaseDO {
    /**
     * 部门id
     */
    @TableId(value = "id", type = IdType.INPUT)
    @Schema(description="部门id")
    private Long id;

    /**
     * 部门名称
     */
    @TableField(value = "`name`")
    @Schema(description="部门名称")
    private String name;

    /**
     * 父部门id
     */
    @TableField(value = "parent_id")
    @Schema(description="父部门id")
    private Long parentId;

    /**
     * 父节点路径
     */
    @TableField(value = "tree_path")
    @Schema(description="父节点路径")
    private String treePath;

    /**
     * 显示顺序
     */
    @TableField(value = "sort")
    @Schema(description="显示顺序")
    private Integer sort;

    /**
     * 负责人
     */
    @TableField(value = "leader_user_id")
    @Schema(description="负责人")
    private Long leaderUserId;

    /**
     * 联系电话
     */
    @TableField(value = "phone")
    @Schema(description="联系电话")
    private String phone;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    @Schema(description="邮箱")
    private String email;

    /**
     * 部门状态（0正常 1停用）
     */
    @TableField(value = "`status`")
    @Schema(description="部门状态（0正常 1停用）")
    private Byte status;
}